package com.itheima.controller;


import com.itheima.entity.*;
import com.itheima.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ReportController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/report/empGenderData")
    public Result empGenderData(){
        List<EmpGender> empGender=reportService.empGenderData();

        return Result.success(empGender);
    }

    @GetMapping("/report/empJobData")
    public Result empJobData(){
        EmpJob empJob=reportService.empJobData();
        return Result.success(empJob);
    }

    @GetMapping("/report/studentDegreeData")
    public Result studentDegreeData(){
        List<StudentDegree> degreeList=reportService.studentDegreeData();
        return Result.success(degreeList);
    }

    @GetMapping("/report/studentCountData")
    public Result studentCountData(){
        StudentCount studentCountList=reportService.studentCounte();
        return Result.success(studentCountList);

    }
    


}
